<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1"/>
  <title>Vue直接引入Script资源</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app"></div>
<script>
new Vue({
  // 等同与document.getElementById("app")
  el: '#app',
  // template: "<div>{{message}}</div>",
  render: function (createElement) {
    if (this.condition) {
      return createElement('h1', "condition work!")
    } else {
      return createElement('p', "condition not work!")
    }
  },
  render: function (createElement) {
    return createElement('ul', this.items.map(function (item) {
      return createElement('li', item)
    }))
  },
  data () {
    return {
      message: "欢迎来到Vue的实际"
    };
  },
  beforeMount () {
    console.log("beforeMount", this.$el);
  },
  mounted () {
    console.log(this.$el);
  }
});
</script>
</body>
</html>